package moodle.Agentes.actions.Companheiro;

import java.io.IOException;
import java.io.Serializable;
import java.util.Collection;

import moodle.Org.MoodleEnv;
import moodle.dados.Aluno;
import jade.core.AID;
import jade.lang.acl.ACLMessage;
import jamder.Environment;
import jamder.agents.GenericAgent;
import jamder.behavioural.Action;
import jamder.behavioural.Condition;

public class ComunicarFormadorAgNotasBaixas extends Action{

	private boolean done = false;
	private boolean mantemAtivo;
	
	public ComunicarFormadorAgNotasBaixas(String name) {
		super(name);
		
	}
	
	public ComunicarFormadorAgNotasBaixas(String name, Condition pre_condition,
			Condition pos_condition) {
		super(name, pre_condition, pos_condition);

	}
	
	@Override
	public void execute(Environment env, Object[] params) {
		
		
		GenericAgent agent = (GenericAgent) myAgent;
					
		ACLMessage msg = new ACLMessage(ACLMessage.INFORM);
		msg.setConversationId("perception");
		msg.addReceiver(new AID("FormadorAg", AID.ISLOCALNAME));
		msg.setContent("orientarAlunoNotaBaixa");
		agent.sendMessage(msg);
			
			
		
		done = true;
		
		
	}
	
	@Override
	public boolean done() {
		return done;
	}
}
